package com.itheima.extendsdemo;

/**
 * 2025/4/12 11:13
 */
public class TestAnimal {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Cat cat = new Cat();

        dog.sound();
        cat.sound();

        System.out.println(dog);
        //java中所有类的root根类都是默认的Object类，所以Object类中所有的public的方法，所有类都可以使用
        System.out.println(dog.toString());
        System.out.println(cat.toString());
        int[] arr = {1,2,3};
        System.out.println(arr.toString());

    }
}
